<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f"%>
<%@ taglib uri="/mytag" prefix="yjd"%>
<div class="wrap">
	<div class="h_a">项目搜索</div>
	<div class="search_type cc mb10">
		<form action="?" method="get" autocomplete="off">
			<label>标题：</label><input name="likeTitle" type="text" class="input length_3 mr10" value="${param.likeTitle }"	placeholder="请输入借款标题">
			<label>会员：</label><input name="userKeys" type="text" class="input length_3 mr10" value="${param.userKeys }" placeholder="用户名/姓名/身份证/企业名称">
			<label>风控：</label>
			<select	name="verify_1_name" class="mr10">
				<option value="">全部</option>
				<c:forEach items="${requestScope.admins }" var="item">
				<option ${param.verify_1_name==item.username?"selected='selected'":"" } value="${item.username }">${item.role==2?"└──":""}${item.username }</option>
				</c:forEach>
			</select>
			<label>状态：</label>
			<select name="status" class="mr10">
				<option value="">全部</option>
				<c:forEach items="${borrowStatusList }" var="item">
				<option ${param.status==item.value?"selected='selected'":"" } value="${item.value }">${item.name }</option>
				</c:forEach>
			</select>
			<label>存管标：</label>
			<select name="bank_depo" class="mr10">
				<option value="" selected="selected">全部</option>
				<option value="1">是</option>
				<option value="0">否</option>
			</select>
			<label>拒绝码：</label>
			<select name="refuse" class="mr10">
				<option value="">全部</option>
				<c:forEach items="${borrowRefuseList }" var="item">
				<option ${param.refuse==item.value?"selected='selected'":"" } value="${item.value }">${item.name }</option>
				</c:forEach>
			</select>
			<button type="submit" class="btn btn_submit length_1">搜索</button>
		</form>
	</div>
	<!-- 列表 -->
	<c:set var="hashData" value="${pager.pagerModel.dataList!=null && fn:length(pager.pagerModel.dataList)>0 }" />
	<div class="table_list">
		<table width="100%">
			<thead>
				<tr>
					<td width="60">ID</td>
					<td>标题</td>
					<td>借款金额</td>
					<td>年化率</td>
					<td>期限</td>
					<td>申请人</td>
					<td>申请日期</td>
					<td>状态</td>
					<td>标的类型</td>
					<td>操作</td>
				</tr>
			</thead>
			<c:if test="${hashData }">
			<tbody>
			<c:forEach items="${pager.pagerModel.dataList }" var="item">
				<tr>
					<td>${item.borrowModel.borrow_id }</td>
					<td>
					<c:choose>
						<c:when test="${item.borrowModel.status>=40 }">
						<a target="_blank" href="${FPWEB.frontRootPath }/invest/view/${item.borrowModel.borrow_id }${FPWEB.frontUrlStuff }">${item.borrowModel.title }</a>
						</c:when>
						<c:otherwise>
						${item.borrowModel.title }
						</c:otherwise>
					</c:choose>
					<c:if test="${item.borrowModel.qclass==4 }"><font color="#fff" style="background-color: #FF9400;border-color: #fff;line-height:30px;padding:5px;">易借卡</font></c:if>
					</td>
					<td><f:formatNumber value="${item.borrowModel.price }" pattern="##0.00" /></td>
					<td>${item.borrowModel.apr }%</td>
					<td>${item.borrowModel.limit }个月</td>
					<td>${item.borrower.username }</td>
					<td>${item.borrowModel.strMap.addtime }</td>
					<td>${item.borrowModel.strMap.status }</td>
					<td>
						<c:choose>
							<c:when test="${item.borrowModel.bank_depo == 1}">
								存管专享标
							</c:when>
							<c:otherwise>
								普通标
							</c:otherwise>
						</c:choose>
					</td>
					<td><a class="btn btn_green mr10"
						href='<yjd:url url="/borrow/listDetail/${item.borrowModel.borrow_id }/0"/>'>详情</a></td>
				</tr>
			</c:forEach>
			</tbody>
			</c:if>
		</table>
	</div>
	<!-- 分页 -->
	<%@ include file="../public/pager/pager.pagination.jsp" %>
</div>
<script>
	YJD.use('AppAdminCommon');
</script>